package aufgabe1;

public class Edge {
	private Vertice _start;
	private Vertice _end;
	private int _value;
	private boolean _visited;

	public boolean isVisited() {
		return _visited;
	}

	public void setVisited(boolean visited) {
		_visited = visited;
	}

	public Edge(Vertice start, Vertice end, int value) {
		_start = start;
		_end = end;
		_value = value;

	}

	public int getValue() {
		return _value;
	}

	public Vertice getStart() {
		return _start;
	}

	public Vertice getEnd() {
		return _end;
	}

	public void setValue(int val) {
		_value = val;
	}

	@Override
	public boolean equals(Object o) {
		Edge temp = (Edge) o;
		if (temp.getStart().equals(this.getStart())
				&& temp.getEnd().equals(this.getEnd())
				&& temp.getValue() == this.getValue()) {
			return true;
		} else
			return false;
	}

	@Override
	public String toString() {

		return "Edge [_start=" + _start + ", _end=" + _end + ", _value="
				+ _value + "]";
	}

}
